package dao

import (
	"gin-products/global"
	"gin-products/inter/model"
)

func GetOrderList(userId uint, order []*model.Order) model.Order {
	var require model.Order
	if err := global.DB.Where("user_id = ?", userId).Find(&order); err != nil {
		return model.Order{}
	}
	return require
}
